import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'
import {Layout} from "@/layouts";

const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_APP_BASE ?? '/'),
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: 'home',
      children: [
        {
          path: 'home',
          name: 'home',
          component: HomeView,
        },
        {
          path: 'about',
          name: 'about',
          component: () => import('../views/AboutView.vue'),
        },
      ]
    },
  ],
})

export default router
